package com.icinfo.cloud.provider.punish.fastcase.controller;

import com.icinfo.cloud.provider.punish.fastcase.dto.FastCaseEvidenceCollectInfoDeleteDto;
import com.icinfo.cloud.provider.punish.fastcase.dto.FastCaseEvidenceCollectInfoSaveDto;
import com.icinfo.cloud.provider.punish.fastcase.dto.FastCaseFormSubmitAddInfoDto;
import com.icinfo.cloud.provider.punish.fastcase.service.IFastCaseService;
import com.icinfo.cloud.provider.punish.fastcase.vo.FastCaseEvidenceCollectInfoVo;
import com.icinfo.cloud.provider.punish.ucase.punishinform.dto.FastCaseAddInfoDto;
import com.icinfo.cloud.provider.punish.ucase.punishinform.dto.FastCaseAddInfoTemporaryDto;
import com.icinfo.framework.common.web.Result;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 描述：简案快办证据采集 控制器
 * @author shishengyao
 * @description
 * @date 2023/8/16
 */
@RestController
@RequestMapping("/app/fast/case/formSubmit")
public class AppFastCaseFormSubmitController {
    @Resource
    private IFastCaseService fastCaseService;
    /**
     * 描述：获取证据采集列表
     *
     * @param
     * @return
     */
    @GetMapping("/getEvidenceCollectInfo")
    public Result<FastCaseEvidenceCollectInfoVo> getEvidenceCollectInfo(@RequestParam(value = "caseId") String caseId){
        Result result =  fastCaseService.getEvidenceCollectInfo(caseId);
        return result;
    }

    /**
     * 描述：保存证据采集信息
     *
     * @param
     * @return
     */
    @PostMapping("/saveEvidenceCollectInfo")
    public Result<String> saveEvidenceCollectInfo(@Validated @RequestBody FastCaseEvidenceCollectInfoSaveDto saveDto){
        return fastCaseService.saveEvidenceCollectInfo(saveDto);
    }

    /**
     * 【V1.12.1】简案快办调查终结保存
     *
     * @param addInfoDto 添加信息dto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2023/08/24
     */
    @PostMapping(value = "/saveInvestigateEnd",produces = MediaType.APPLICATION_JSON_VALUE)
    public Result<String> saveInvestigateEnd(@RequestBody @Validated FastCaseFormSubmitAddInfoDto addInfoDto){
        return fastCaseService.saveInvestigateEnd(addInfoDto);
    }

    /**
     * 【V1.12.1】 简案快办调查终结暂存信息获取
     *
     * @param dto
     * @return {@link Result<FastCaseAddInfoDto> }
     * @author shishengyao
     * @date 2023/08/24
     */
    @PostMapping(value = "/getInvestigateEndTemporary",produces = MediaType.APPLICATION_JSON_VALUE)
    public Result<FastCaseFormSubmitAddInfoDto> getInvestigateEndTemporary(@RequestBody @Validated FastCaseAddInfoTemporaryDto dto){
        return fastCaseService.getInvestigateEndTemporary(dto);
    }
    /**
     * 【V1.12.1】删除证据采集信息
     *
     * @param dto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2023/09/06
     */
    @PostMapping(value = "/delEvidenceCollectInfo")
    public Result<String> delEvidenceCollectInfo(@RequestBody @Validated FastCaseEvidenceCollectInfoDeleteDto dto){
        return fastCaseService.delEvidenceCollectInfo(dto);
    }
}
